package cn.topevery.garden.dal.dao;

import cn.topevery.garden.entity.dto.ProjMoneyDTO;
import cn.topevery.garden.entity.po.ProjBid;
import cn.topevery.garden.entity.po.ProjContract;
import cn.topevery.garden.entity.query.ProjContractQuery;
import cn.topevery.garden.entity.vo.ProjContractMoneyVO;
import cn.topevery.garden.entity.vo.ProjContractVO;
import cn.topevery.garden.framework.base.BaseDao;
import hw.topevery.framework.db.entity.DataPager;

import java.util.Collection;
import java.util.List;

/**
 * 项目合同表
 *
 * @author code-generate
 * @date 2022-11-02
 */
public interface ProjContractDao extends BaseDao<ProjContract> {

    /**
     * 获得列表
     *
     * @param query
     * @return
     */
    List<ProjContractVO> list(ProjContractQuery query);


    /**
     * 获取分页列表
     *
     * @param query
     * @return
     */
    DataPager<ProjContractVO> listPage(ProjContractQuery query);

    /**
     * 新增编辑
     *
     * @param userId
     * @param entityClass
     * @param entity
     */
    void saveOrUpdate(String userId, Class<ProjContract> entityClass, ProjContract entity);

    /**
     * 批量新增编辑
     *
     * @param userId 用户ID
     * @param list   数量集
     */
    void saveOrUpdate(String userId, Class<ProjContract> entityClass, Collection<ProjContract> list);

    ProjContract getEntityByGuidId(String contractId);

    ProjContractMoneyVO getContractMoney(ProjMoneyDTO moneyDTO);
}
